<?php

namespace mpend\modules\share\controllers;

use Yii;
use mpend\components\Controller;
use mpend\modules\share\models\GoodsView;

/**
 * 分享的商品
 * 
 * @author emhome <emhome@163.com>
 * @since 1.0
 */
class GoodsController extends Controller {

    public $closeCheckAuthent = true;

    /**
     * {@inheritdoc}
     */
    protected function verbs() {
        return [
            '*' => ['GET'],
        ];
    }

    /**
     * 动态详情
     * {@inheritdoc}
     */
    public function actionView($id) {
        $model = GoodsView::findOne($id);
        if (!$model) {
            return parent::error('请求的动态内容不存在或者已被删除');
        }
        return $model;
    }

}
